
	<div class="block">

<div id= 'content'>
	<h2>机构管理</h2>
	<table class="contentTable" border="1">
			<tbody><tr class="solid">
		<td>机构号</td>
		<td>名字</td>
		<td>类型</td>
		<td>描述</td>
		<td>操作</td>

		</tr>
	
	
		<?php

		    global $organizationType;
			
		foreach($allOrganizations as $org){
		?>
		<tr>
		<td><?php echo $org->id;?></td>
		<td><?php echo $org->name;?></td>
		<td><?php echo $organizationType[$org->type];?></td>
		<td><?php echo $org->des;?></td>	
		<td>
			 <form action="api/" method="post">
        	<input type="hidden" id='action' name="action" value="delete_organization" />
            <input type="hidden" id='id' name="id" value=<?php echo $org->id;?> />

            <input type="submit" value="删除" />
          </form>
          
          
          <form action="index.php" method="GET">
          	            <input type="hidden" id='id' name="id" value=<?php echo $org->id;?> />
          	            <input type="hidden" id='page' name="page" value='alter_organizations'/>

<div>
<input type="submit" value="更改">
</div>
</form>


		</td>
		</tr>

	
	<?php
		}
	?>
		</tbody></table>
<br>
<br>
<br>
<div class="done" style="display:none;">
<b>操作成功</b>
<a href="?page=current_user">返回</a>
</div>

    <div class="form">
    	<b>添加机构</b>
        <form action="api/" method="post">
        	<input type="hidden" id='action' name="action" value="add_organization" />


   <div class="element">
        <label>机构类型</label>
  <select name="type"> 
        <option VALUE="s" selected="selected">商铺</option>
        <option VALUE="w"> 仓库</option>
 
    </select>
    </div>
    
    <div class="element">
        <label>机构名字</label>
 
        <input type="text" id="name" name="name" class="text" value='' >
    </div>
    <div class="element">
        <label>机构描述</label>
 
        <input type="text" id="des" name="des" class="text" value='' >
    </div>

    <div class="element">
<input type="submit" value="递交" />
        <div class="loading"></div>
    </div>
    </form>
    </div>
    </div>
<div class="clear"></div>
	</div>